import axios from './axios';

const educationsalUrl = 'educationsal'; // 个人求职意向

export default {
  // 创建个人教育信息
  postJob(obj) {
    const postObj = {
      college: obj.college,
      major: obj.major,
      startTime: Math.round(obj.startTime / 1000),
      endTime: Math.round(obj.endTime / 1000),
    };
    return axios.post(`${educationsalUrl}`, postObj);
  },
  // 编辑教育信息
  putEdu(obj) {
    const postObj = {
      id: obj.id,
      college: obj.college,
      major: obj.major,
      startTime: Math.round(obj.startTime / 1000),
      endTime: Math.round(obj.endTime / 1000),
    };
    return axios.put(`${educationsalUrl}`, postObj);
  },
  // // 求职教育信息列表
  getEduList() {
    return axios.get(`${educationsalUrl}`);
  },
  // // 删除个人基础信息
  delEdu(id) {
    return axios.delete(`${educationsalUrl}?id=${id}`);
  },
};
